Skip to main content

Authentication Flow

Authentication Documentation (Google OAuth - Company Domain Restricted)

Signup Flow (First-Time Login)

User clicks the "Continue with Google" button.

They are redirected to the Google OAuth authentication page.

After granting access, Google sends an authorization code back to the application.

The backend exchanges the authorization code for an access token and retrieves the user's profile.

The system verifies that the email belongs to the allowed domain (@yourcompany.com).

If the user is logging in for the first time:

The system creates a new user entry in the database with a no access role.

The administrator must manually assign a role to the user before access is granted.

Once assigned a role, the user can log in and access the system.

Login Flow (Existing Users)

User clicks the "Continue with Google" button.

They are redirected to the Google OAuth authentication page.

After granting access, Google sends an authorization code back to the application.

The backend exchanges the authorization code for an access token and retrieves the user's profile.

The system verifies that the email belongs to the allowed domain (@sentry.security).

If valid, the user session is created, and a JWT token is issued for authentication.

If the user hasn't signed up before he won't be

The user is redirected to the dashboard.

Logout Flow

The user clicks the "Logout" button.

The application clears the authentication token and session data.

Optionally, users are redirected to Google's logout endpoint to fully sign out.